﻿==============================================================================
DOSYA ADI  : DatabaseThread.cpp
KAYNAK      : -GameServer\DatabaseThread.cpp
SISTEM      : v2369 Reconnect - SUNUCU
BOYUT       : 50904 bayt / 1844 satir
ACIKLAMA    : Logout sirasinda reconnect korumasi (token silinmez)
ESLESME     : 3 satir / 1 blok
==============================================================================

NOT: Bu dosya yalnizca RECONNECT ile ilgili kod bloklarini icerir.
     Satir numaralari KAYNAK dosyadaki orijinal satirlardir.

----------------------------------------------------------------------
>> KAYNAK SATIR 1406 - 1459
----------------------------------------------------------------------
  1406 | 		break;
  1407 | 	}
  1408 | }
  1409 | 
  1410 | void CUser::ReqUserLogOut()
  1411 | {
  1412 | 	if (m_bLevel == 0 || !m_deleted)
  1413 | 	{
  1414 | 
  1415 | 		m_deleted = false;
  1416 | 		m_bCharacterDataLoaded = false;
  1417 | 		return;
  1418 | 	}
  1419 | 
  1420 | 	if (isInGame())
  1421 | 	{
  1422 | 		UserInfoStorage(false);
  1423 | 		UserInOut(InOutType::INOUT_OUT);
  1424 | 		BottomUserLogOut();
  1425 | 		PetOnDeath();
  1426 | 		GmListProcess(true);
  1427 | 
  1428 | 		if (pCindWar.isEventUser() && g_pMain->isCindirellaZone(GetZoneID()))
  1429 | 			CindirellaLogOut(true);
  1430 | 
  1431 | 		// Reconnect akışı sürüyorsa (askı aktif veya disconnect edilmiş reconnect
  1432 | 		// ticket'ı geçerli) parti üyeliği SİLİNMEZ: karakter resume sonrası
  1433 | 		// partide kalır (bkz. RestoreReconnectParty / SweepReconnectTickets).
  1434 | 		if (isInParty() && !IsReconnectPending())
  1435 | 		{
  1436 | 			auto* pParty = g_pMain->GetPartyPtr(GetPartyID());
  1437 | 			if (pParty && isPartyLeader())
  1438 | 				PartyLeaderPromote(pParty->uid[1], pParty);
  1439 | 
  1440 | 			PartyNemberRemove(GetSocketID(), pParty);
  1441 | 		}
  1442 | 
  1443 | 		if (isInClan())
  1444 | 		{
  1445 | 			CKnights* pKnights = g_pMain->GetClanPtr(GetClanID());
  1446 | 			if (pKnights != nullptr)
  1447 | 			{
  1448 | 
  1449 | 				pKnights->OnLogout(this);
  1450 | 				if (pKnights->isInAlliance())
  1451 | 					pKnights->OnLogoutAlliance(this);
  1452 | 
  1453 | 				KnightsClanBuffUpdate(false, pKnights);
  1454 | 				g_DBAgent.UpdateClanWarehouseData(pKnights->GetName(), this);
  1455 | 			}
  1456 | 		}
  1457 | 
  1458 | 		PlayerKillingRemovePlayerRank();
  1459 | 		ZindanWarKillingRemovePlayerRank();

